<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Security APIs | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'security-api.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/security-api.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/security-api.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/security-api.html" rel="nofollow" target="_blank">../en/security-api.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="rest-apis.html">REST APIs</a></span>
»
<span class="breadcrumb-node">Security APIs</span>
</div>
<div class="navheader">
<span class="prev">
<a href="search-rank-eval.html">« Ranking Evaluation API</a>
</span>
<span class="next">
<a href="security-api-authenticate.html">Authenticate API »</a>
</span>
</div>
<div class="chapter xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="security-api"></a>Security APIs<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>
<p>You can use the following APIs to perform security activities.</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-authenticate.html" title="Authenticate API">Authenticate</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-clear-cache.html" title="Clear cache API">Clear cache</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-delegate-pki-authentication.html" title="Delegate PKI authentication API">Delegate PKI authentication</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-has-privileges.html" title="Has privileges API">Has privileges</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-ssl.html" title="SSL certificate API">SSL certificate</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-get-builtin-privileges.html" title="Get builtin privileges API">Get builtin privileges</a>
</li>
</ul>
</div>
<h3>
<a id="security-api-app-privileges"></a>Application privileges<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to add, update, retrieve, and remove application
privileges:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-put-privileges.html" title="Create or update application privileges API">Create or update privileges</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-delete-privilege.html" title="Delete application privileges API">Delete privileges</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-get-privileges.html" title="Get application privileges API">Get privileges</a>
</li>
</ul>
</div>
<h3>
<a id="security-role-mapping-apis"></a>Role mappings<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to add, remove, update, and retrieve role mappings:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-put-role-mapping.html" title="Create or update role mappings API">Create or update role mappings</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-delete-role-mapping.html" title="Delete role mappings API">Delete role mappings</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-get-role-mapping.html" title="Get role mappings API">Get role mappings</a>
</li>
</ul>
</div>
<h3>
<a id="security-role-apis"></a>Roles<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to add, remove, update, and retrieve roles in the native realm:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-put-role.html" title="Create or update roles API">Create or update roles</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-clear-role-cache.html" title="Clear roles cache API">Clear roles cache</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-delete-role.html" title="Delete roles API">Delete roles</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-get-role.html" title="Get roles API">Get roles</a>
</li>
</ul>
</div>
<h3>
<a id="security-token-apis"></a>Tokens<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to create and invalidate bearer tokens for access
without requiring basic authentication:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-get-token.html" title="Get token API">Get token</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-invalidate-token.html" title="Invalidate token API">Invalidate token</a>
</li>
</ul>
</div>
<h3>
<a id="security-api-keys"></a>API Keys<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to create, retrieve and invalidate API keys for access
without requiring basic authentication:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-create-api-key.html" title="Create API key API">Create API Key</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-get-api-key.html" title="Get API key information API">Get API Key</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-invalidate-api-key.html" title="Invalidate API key API">Invalidate API Key</a>
</li>
</ul>
</div>
<h3>
<a id="security-user-apis"></a>Users<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to add, remove, update, or retrieve users in the
native realm:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-put-user.html" title="Create or update users API">Create or update users</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-change-password.html" title="Change passwords API">Change passwords</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-delete-user.html" title="Delete users API">Delete users</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-disable-user.html" title="Disable users API">Disable users</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-enable-user.html" title="Enable users API">Enable users</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-get-user.html" title="Get users API">Get users</a>
</li>
</ul>
</div>
<h3>
<a id="security-openid-apis"></a>OpenID Connect<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to authenticate users against an OpenID Connect
authentication realm when using a custom web application other than Kibana</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-oidc-prepare-authentication.html" title="OpenID Connect Prepare Authentication API">Prepare an authentication request</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-oidc-authenticate.html" title="OpenID Connect authenticate API">Submit an authentication response</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-oidc-logout.html" title="OpenID Connect logout API">Logout an authenticated user</a>
</li>
</ul>
</div>
<h3>
<a id="security-saml-apis"></a>SAML<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/rest-api/security.asciidoc">edit</a>
</h3>
<p>You can use the following APIs to authenticate users against a SAML authentication
realm when using a custom web application other than Kibana</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<a class="xref" href="security-api-saml-prepare-authentication.html" title="SAML prepare authentication API">Prepare an authentication request</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-saml-authenticate.html" title="SAML authenticate API">Submit an authentication response</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-saml-logout.html" title="SAML logout API">Logout an authenticated user</a>
</li>
<li class="listitem">
<a class="xref" href="security-api-saml-invalidate.html" title="SAML invalidate API">Submit a logout request from the IdP</a>
</li>
</ul>
</div>


































</div>
<div class="navfooter">
<span class="prev">
<a href="search-rank-eval.html">« Ranking Evaluation API</a>
</span>
<span class="next">
<a href="security-api-authenticate.html">Authenticate API »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>